#include "SMPPMessageState.hpp"

using namespace smpp::pdu;

MessageState::MessageState(const quint8 nValue):
TLV(TLVtags::TAG_MESSAGE_STATE,1),_Value(nValue){}

MessageState::MessageState(const MessageState &nMessageState):
TLV(nMessageState),_Value(nMessageState.getValue()){}

bool MessageState::operator ==(const MessageState &nMessageState) const{
	return (TLV::operator == (nMessageState) && 
			_Value == nMessageState.getValue());
}

bool MessageState::operator !=(const MessageState &nMessageState) const{
	return !this->operator == (nMessageState);
}

MessageState &MessageState::operator =(const MessageState &nMessageState){
	if(*this == nMessageState)
		return *this;
	TLV::operator = (nMessageState);
	_Value = nMessageState.getValue();
	return *this;
}

void MessageState::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 MessageState::getValue() const{
	return _Value;
}
